﻿using System;
using System.Collections.Generic;

using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Common.Contracts
{
	/// <summary>
	/// Contract for libraries services.
	/// </summary>
	public interface ILibraryService : IECamelService
	{
		/// <summary>
		/// Gets a library by the sepcified id.
		/// </summary>
		/// <param name="libraryId"></param>
		/// <returns></returns>
		Library GetLibraryById(int libraryId);
		/// <summary>
		/// Gets a list of all the libraries.
		/// </summary>
		/// <returns>A list of all libraries.</returns>
		List<Library> GetAllLibraries();
		/// <summary>
		/// Create a new library.
		/// </summary>
		/// <param name="library">Details of new library.</param>
		/// <returns>If valid null, otherwise - a validation error.</returns>
		ECamelError CreateLibrary(Library library);
		/// <summary>
		/// Updates a library.
		/// </summary>
		/// <param name="library">Details of updated library.</param>
		/// <returns>If valid null, otherwise - a validation error.</returns>
		ECamelError UpdateLibrary(Library library);
		/// <summary>
		/// Updates a library's status.
		/// </summary>
		/// <param name="libraryId">Id of library to change status of.</param>
		/// <param name="active">New library status.</param>
		ECamelError UpdateLibraryStatus(int libraryId, bool active);
	}
}